import request from '@/utils/request';



export async function pageQaCase(projectId, qaItemId, params) {
    return request(`/project/${projectId}/qaItem/${qaItemId}/case/page`, {
        params,
    });
}

export async function save(projectId,qaItemId, data) {
    return request(`/project/${projectId}/qaItem/${qaItemId}/case`, {
        method: "POST",
        data: data
    });
}

export async function update(projectId, qaItemId, caseId, data) {
    return request(`/project/${projectId}/qaItem/${qaItemId}/case/${caseId}`, {
        method: "POST",
        data: data
    });
}

export async function deleteCase(projectId, qaItemId, caseId) {
    return request(`/project/${projectId}/qaItem/${qaItemId}/case/${caseId}`, {
        method: "DELETE",
    });
}

export async function getDetail(projectId, qaItemId, caseId) {
    return request(`/project/${projectId}/qaItem/${qaItemId}/case/${caseId}`);
}